Request webpage with URL is a new trigger action type #169 which is described in Advanced Level Editor as "Request webpage with URL stored in variable 'A' and save response to variable 'B' once loaded (variable 'B' will be equal to ''loading...'' for some period of time)".
What it does is simply asks one of our servers to download contents of remote file while providing some basic info in POST request:
map_id
user_uid
user_login
Once trigger action has been executed - valid response won't appear instantly. Instead, variable 'B' would have ''loading...'' as it's value for some period of time while remote page loads.
There also few possible error codes that will replace ''loading...'' once some error will happen:
error 1 - Unable to get right to send requests to PB2 server
error 3 - IO Error
error 4 - URL requests are not supported on player's computer (should not really happen)
error 5 - Player who sent request has his account disabled on PB2 website
not logged in - Player who sent request is not logged into any account (trigger action won't work for guests that do not have accounts, but will work for users who have entered as guest, see Note 2 below for differences)
Error: URL needs to start with http:// or https:// (got *URL* instead)
Variable 'B' will get contents of requested URL if no error happened.
Note 1: If hosted website has redirection (for example from http to https) - make sure URL is final. In else case POST parameters will be missing.
Note 2: Guests in multiplayer mode will cause trigger action to send user_uid as -1 and user_login as .guest
Article made by Eric Gurt.